//
//  MyAttentionListCell.m
//  ShangHaiTuJI
//
//  Created by xiaoxiangtuji on 2017/9/27.
//  Copyright © 2017年 xiaoxiangtuji. All rights reserved.
//

#import "MyAttentionListCell.h"

@implementation MyAttentionListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        UIImageView *iconImageView = [[UIImageView alloc] init];
        iconImageView.backgroundColor = [UIColor cyanColor];
        [self.contentView addSubview:iconImageView];
        [iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake(50, 50));
            make.left.equalTo(self.contentView.mas_left).offset(scaleLeftAndRight(12));
            make.centerY.equalTo(self.contentView.mas_centerY);
        }];
        iconImageView.layer.cornerRadius = 25;
        iconImageView.layer.masksToBounds = YES;
        UILabel *namelabel = [[UILabel alloc] init];
        namelabel.font = [UIFont systemFontOfSize:15];
        namelabel.textColor = COLOR_HEX(0x121212);
        namelabel.text = @"孙大炮的小粉丝";
        [self.contentView addSubview:namelabel];
        [namelabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.contentView.mas_top).offset(scaleTopAndBottom(20));
            make.left.equalTo(iconImageView.mas_right).offset(scaleLeftAndRight(10));
            make.right.equalTo(self.contentView.mas_right).offset(scaleLeftAndRight(-10));
            make.height.mas_equalTo(scaleTopAndBottom(15));
        }];
        UILabel *descrplabel = [[UILabel alloc] init];
        descrplabel.font = [UIFont systemFontOfSize:13];
        descrplabel.textColor = COLOR_HEX(0x999999);
        descrplabel.text = @"九分裤拉师傅老师带你飞上来看的结果来看时间分开来说";
        [self.contentView addSubview:descrplabel];
        [descrplabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(namelabel.mas_bottom).offset(scaleTopAndBottom(10));
            make.left.equalTo(iconImageView.mas_right).offset(scaleLeftAndRight(10));
            make.right.equalTo(self.contentView.mas_right).offset(scaleLeftAndRight(-10));
            make.height.mas_equalTo(scaleTopAndBottom(10));
        }];
        
        
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
